<!-- 10.15 -->
<template>
	<view class="content">
		<image class="image" :src="bg" mode=""></image>
		<view class="dwei">
			<view class="font40 top1">
				当你我在一起时，时间都静止了
			</view>
			<view class="font40">
				活动也如此
			</view>
			<view class="font50">
				免费赠送价值<text class="font70">158元</text>的珠宝
			</view>
			<view class="qr">
				<image class="qr-img" :src="qr" mode=""></image>
			</view>
			<view class="font25">
				长按二维码进入小程序
			</view>
			<view class="font35">
				领取地址：{{name1}}
			</view>
			<view class="font30">
				主办单位：双熙堂珠宝
			</view>
			<view class="font30">
				支持单位：{{name1}}
			</view>
			<view class="btn" @click="toindex">
				<image class="btn-image" src="/static/image/showindex/b.png" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name1: '',
				name2: '',
				bg: '',
				qr: ''
			}
		},
		onLoad(options) {
			// console.log(options);
			let opq = decodeURIComponent(options.q)
			// let id = options.adid + ',' + options.dwid
			this.request(opq)
		},
		methods: {
			async request(url) {
				const res = await this.$request({
					url: url,
					// data: {
					// 	keyword: id,
					// }
				});
				if (res.code == 0) {
					// console.log(res);
					this.name1 = res.data[0].name
					this.name2 = res.data[1].name
					this.qr = res.data[0].icon_url
					this.bg = res.data[1].icon_url
				}
			},
			toindex() {
				uni.redirectTo({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.dwei {
		width: 100%;
	}

	.image {
		width: 100vw;
		height: 100vh;
		position: absolute;
		top: 0;
		left: 0;
		z-index: -999;
	}

	.top1 {
		margin-top: 6vh;
	}

	.font25 {
		font-size: 25rpx;
		line-height: 72rpx;
		text-align: center;
		font-weight: 600;
	}

	.font35 {
		width: 670rpx;
		font-size: 35rpx;
		line-height: 72rpx;
		font-weight: 600;
		margin: 0 auto;
	}

	.font30 {
		width: 670rpx;
		font-size: 30rpx;
		line-height: 72rpx;
		font-weight: 600;
		margin: 0 auto;
	}

	.btn {
		width: 670rpx;
		height: 240rpx;
		margin: 0 auto;
	}

	.btn-image {
		width: 670rpx;
		height: 240rpx;
	}

	.font40 {
		font-size: 40rpx;
		line-height: 72rpx;
		text-align: center;
		font-weight: 600;
	}

	.font50 {
		margin-top: 3.3vh;
		font-size: 50rpx;
		line-height: 72rpx;
		text-align: center;
		font-weight: 600;
	}

	.font70 {
		font-size: 70rpx;
		line-height: 72rpx;
		text-align: center;
		font-weight: 600;
	}

	.qr {
		margin: 2.2vh auto;
		width: 231rpx;
		height: 231rpx;
	}

	.qr-img {
		width: 231rpx;
		height: 231rpx;
	}
</style>
